package com.ld.security.common.quartz.modules.job.entity;

import com.baomidou.mybatisplus.annotation.TableName;
import com.ld.security.common.core.base.column.ListJson;
import com.ld.security.common.core.base.column.MapJson;
import com.ld.security.common.mybatis.anno.LabelKey;
import com.ld.security.common.mybatis.anno.LabelKeys;
import com.ld.security.common.mybatis.anno.SqlKey;
import com.ld.security.common.mybatis.base.entity.LabelMap;
import com.ld.security.common.mybatis.base.entity.SuperEntity;
import com.ld.security.common.mybatis.constant.SqlCondition;
import com.ld.security.common.quartz.modules.job.constant.JobTaskConstant;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

@TableName("job_task")
@ApiModel("作业任务")
@Data
public class JobTaskEntity  extends SuperEntity  implements LabelMap
{


  @ApiModelProperty("作业模板")
  @SqlKey(SqlCondition.eq)
  private String taskTelId;

  @ApiModelProperty("作业名")
  @SqlKey(SqlCondition.like)
    private String jobName;







  @ApiModelProperty("参数")

    private ListJson config;



  @ApiModelProperty("描述")
  @SqlKey(SqlCondition.eq)
    private String content;



  @ApiModelProperty("服务名")
  @SqlKey(SqlCondition.eq)
    private String appName;




  @ApiModelProperty("作业状态")
  @SqlKey(SqlCondition.eq)
    private JobTaskConstant.jobStatus jobStatus;




  @ApiModelProperty("定时表达式")
  @SqlKey(SqlCondition.like)
    private String cronExpression;



  @ApiModelProperty("任务组编号")
  @SqlKey(SqlCondition.eq)
  @LabelKeys(value = JobGroupEntity.class,
          labels = {
                  @LabelKey(targetKey = "groupName",sourceKey = "label")
          }
  )
  private String groupId;

  @ApiModelProperty("任务组名")
  @SqlKey(SqlCondition.eq)
  private String groupName;


  @ApiModelProperty("虚拟列")
  private MapJson labelMap;



}
